Skip to content

chore(release): strip pre-existing sponsor block before appending canonical one#9745

Merged
jdx merged 1 commit into
mainfrom
release-strip-sponsor-block
May 9, 2026
Merged

chore(release): strip pre-existing sponsor block before appending canonical one#9745
jdx merged 1 commit into
mainfrom
release-strip-sponsor-block

Conversation

@jdx

@jdx jdx commented May 9, 2026

Copy link
Copy Markdown
Owner

Summary

The release workflow has been ping-ponging on whether communique already includes a sponsor section in its output, and we've shipped two broken releases as a result:

The pattern: every fix encodes an assumption about communique's output, and that assumption later drifts.

Fix

Make the step idempotent. Before appending the canonical block, run a small awk filter over the generated notes that:

  1. Stops at the first ## Sponsor mise or ## 💚 Sponsor mise heading (drops everything from there to EOF), and
  2. Trims trailing blank lines so the heredoc's leading blank gives exactly one blank line of separation.

Result: exactly one canonical ## 💚 Sponsor mise block regardless of whether communique includes its own, includes a different variant, or the git-cliff fallback runs.

I also already manually fixed v2026.5.4's release notes on GitHub to remove the duplicate.

Test plan

Simulated all four input shapes locally and confirmed each produces exactly one ## 💚 Sponsor mise heading with correct spacing:

  • communique output that already contains its own ## Sponsor mise block (the v2026.5.4 case)
  • communique output with no sponsor block (the v2026.5.3-style case)
  • git-cliff fallback output with trailing blank lines
  • communique output that already contains a ## 💚 Sponsor mise variant (idempotent re-run sanity check)

actionlint is clean on the modified workflow.

  • Next tagged release shows exactly one ## 💚 Sponsor mise section.

🤖 Generated with Claude Code


Note

Low Risk
Low risk: changes are confined to the GitHub Actions release-notes generation step and only affect release note formatting/content. Main risk is unintended trimming if the awk pattern matches an unrelated heading.

Overview
Makes release note generation idempotent by removing any pre-existing ## Sponsor mise / ## 💚 Sponsor mise section (and trimming trailing blank lines) before appending the canonical sponsor block.

This prevents releases from shipping with either missing or duplicate sponsor sections regardless of whether communique or the git-cliff fallback includes one.

Reviewed by Cursor Bugbot for commit 7e61317. Bugbot is set up for automated code reviews on this repo. Configure here.

…onical one

The release workflow has been ping-ponging on whether communique's output
already contains a sponsor section. v2026.4.22 / v2026.5.0 dropped it
entirely (#9395 assumed communique would include it; it didn't), and
v2026.5.4 ended up with two (#9580 always-appends, but communique started
including its own).

Make the step idempotent: before appending the canonical block, strip any
pre-existing `## Sponsor mise` / `## 💚 Sponsor mise` section and trailing
blank lines from the generated notes. Now the result is exactly one
sponsor block regardless of what communique produces.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@greptile-apps

greptile-apps Bot commented May 9, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR makes the release-note sponsor block idempotent by inserting an awk filter that strips any pre-existing ## Sponsor mise / ## 💚 Sponsor mise section (and trailing blank lines) from /tmp/release-notes.txt before the canonical heredoc is appended. This resolves a recurring issue where releases shipped with either no sponsor block or a duplicate one, depending on whether communique had started inserting its own.

  • Adds a single awk script between the communique/git-cliff generation block and the heredoc append, correctly buffering and flushing internal blank lines while discarding trailing ones.
  • The regex (💚 )? makes the match tolerant of both emoji and plain variants, covering all observed output shapes.

Confidence Score: 5/5

Safe to merge — the change is confined to a single awk pre-processing step in the release-notes generation path and does not affect any build, test, or publish logic.

The awk script is logically correct: blank-line buffering handles interior whitespace properly, trailing blanks are dropped, and the regex covers both known heading variants. The only environment-specific concern — emoji matching in mawk — works in practice because mawk performs byte-level regex matching and the input file uses the same UTF-8 byte sequence. The change is also well-tested across all four described input shapes.

No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/release.yml Adds an awk pre-processing step to strip any pre-existing sponsor section and trim trailing blank lines before appending the canonical block, making the step idempotent.

Reviews (2): Last reviewed commit: "chore(release): strip pre-existing spons..." | Re-trigger Greptile

@jdx jdx enabled auto-merge (squash) May 9, 2026 12:15
auto-merge was automatically disabled May 9, 2026 12:17

Pull request was closed

@github-actions

github-actions Bot commented May 9, 2026

Copy link
Copy Markdown

Hyperfine Performance

mise x -- echo

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.5.4 x -- echo 20.1 ± 0.9 18.3 23.5 1.00
mise x -- echo 20.4 ± 1.0 18.5 25.5 1.01 ± 0.07

mise env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.5.4 env 19.5 ± 0.9 17.8 23.7 1.00
mise env 19.8 ± 1.0 17.8 24.6 1.01 ± 0.07

mise hook-env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.5.4 hook-env 20.2 ± 1.0 18.3 26.1 1.00
mise hook-env 20.4 ± 0.9 18.7 24.3 1.01 ± 0.07

mise ls

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.5.4 ls 17.1 ± 0.8 15.2 20.2 1.00 ± 0.07
mise ls 17.1 ± 0.8 15.3 20.4 1.00

xtasks/test/perf

Command mise-2026.5.4 mise Variance
install (cached) 126ms 125ms +0%
ls (cached) 59ms 58ms +1%
bin-paths (cached) 65ms 64ms +1%
task-ls (cached) 502ms 504ms +0%

@jdx jdx reopened this May 9, 2026
@jdx jdx merged commit ddb8fad into main May 9, 2026
49 of 52 checks passed
@jdx jdx deleted the release-strip-sponsor-block branch May 9, 2026 12:18
mise-en-dev added a commit that referenced this pull request May 10, 2026
### 🚀 Features

- add --inactive option to outdated and upgrade commands for inactive
tools by @roele in [#9640](#9640)

### 🐛 Bug Fixes

- **(aqua)** resolve bin paths for prefixed v tags by @risu729 in
[#9759](#9759)
- **(bun)** create bunx alongside bun.exe on Windows install by
@JamBalaya56562 in [#9732](#9732)
- **(dotnet)** use shared prerelease tool option by @risu729 in
[#9720](#9720)
- **(node)** use matching node in npm shim by @jdx in
[#9749](#9749)
- **(task)** resolve bash deterministically on Windows to avoid WSL
launcher by @JamBalaya56562 in
[#9750](#9750)

### 📚 Documentation

- **(secrets)** clarify age strict mode default by @risu729 in
[#9737](#9737)
- **(tasks)** add bash shebang to conditional-dependencies example by
@JamBalaya56562 in [#9747](#9747)
- update backend tool option docs by @risu729 in
[#9738](#9738)

### 📦 Registry

- remove tools with zero users by @jdx in
[#9725](#9725)
- add scalafmt
([github:scalameta/scalafmt](https://github.com/scalameta/scalafmt)) by
@pokir in [#9757](#9757)
- remove flarectl by @risu729 in
[#9756](#9756)

### Chore

- **(release)** strip pre-existing sponsor block before appending
canonical one by @jdx in [#9745](#9745)

### New Contributors

- @pokir made their first contribution in
[#9757](#9757)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant